import req from '../http';
//校验电话号码是否唯一
export function checkPhoneNumUnique(datas) {
    return req({
        url: "/member/register/findPhone?phoneNum=" + datas.phone,
        method: "post",
    })
}


//register页面携带手机号获取验证码
export function getCode(datas) {
    return req({
        url: "/member/register/send?phone=" + datas.phone,
        method: "post",
    })
}


// 注册register
export function register(datas) {
    return req({
        url: '/member/register/register',
        method: 'post',
        data: datas
    })
}
// 登录
export function login(datas) {
    return req({
        url: '/memberlogin/memberlogin/memberlogin?username=' + datas.username + '&password=' + datas.password,
        method: 'post',
    })
}

// 找回密码
export function backPwd(datas) {
    return req({
        url: '/member/register/updatepswd',
        method: 'post',
        data:datas
    })

}
